package com.feature.shop.user.api;

import java.util.List;
import java.util.Map;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import com.feature.core.domain.PageVo;
import com.feature.core.domain.Response;
import com.feature.shop.user.api.constant.ApiNameConstant;
import com.feature.shop.user.api.request.AddMenuRequest;
import com.feature.shop.user.api.request.DelMenuRequest;
import com.feature.shop.user.api.request.ShopMenuListRequest;
import com.feature.shop.user.api.request.ShopMenuPageRequest;
import com.feature.shop.user.api.request.UpdateMenuRequest;
import com.feature.shop.user.api.vo.ShopMenuVo;
import com.feature.shop.user.api.vo.ShopTreeMenuVo;

import jakarta.validation.Valid;

/***
 * 菜单表Api
 */
@FeignClient(contextId = "shopMenuApi", name = ApiNameConstant.APPLICATION_NAME)
public interface ShopMenuApi {

    /**
     * list查询
     * 
     * @param request
     * @return
     */
    @GetMapping("/menu/getMenuList")
    Response<List<ShopMenuVo>> getMenuList(ShopMenuListRequest request);

    @GetMapping(value = "/menu/getMenuPageList")
    public Response<PageVo<ShopMenuVo>> getMenuPageList(@Valid ShopMenuPageRequest req);

    @GetMapping(value = "/menu/getAuthMenuList")
    public Response<List<ShopTreeMenuVo>> getAuthMenuList();

    @GetMapping(value = "/menu/getMenuTreeList")
    public Response<List<ShopTreeMenuVo>> getMenuTreeList();

    @GetMapping(value = "/menu/getUserMenuAuth")
    public Response<Map<String, Boolean>> getUserMenuAuth(Integer userId);

    @PostMapping(value = "/menu/addMenu")
    public Response<?> addMenu(AddMenuRequest addMenuRequest);

    @PostMapping(value = "/menu/updateMenu")
    public Response<?> updateMenu(UpdateMenuRequest req);

    @PostMapping(value = "/menu/delMenu")
    Response<?> delMenu(DelMenuRequest req);
}
